RIFF"WEBPVP8 Е�* �>�T�M'��%�u|�� gk�ZaQb�����o����lN���s�_�3��S+���c�€R��y����//����~��H�@�2oF�X ���R@'�:�ꞓ}��a�M,.� ��o��=�p�U�&g<�:���~���t��.�1���cyW�� We�M=�f�Y6v�����(nO���������^- �9(b _�s%{�C|�p�@�����37�}B0��u���i�Գ���� ������5�}���֮M?dz���q�e��N�~�&�N��K�av$]hO�i�C�,��"]�����@����M@�o O[�Æ*;�e]��_; }�p�?��)�'VC� J��L�y� v����18��)7c�d�mߛ�]I� ����d��?�{�.����b)49��c��Zy/��c^��%��/z�å̯�t��rS��Z��Uͩ�h��2����` �7�:��~��zP���Z����?v�R��TD���G����CJ���}�o��fs��̜#b��e"k9,���3�{Or�i��x":���{/ۈ�`�7RČ����(�p:I��%:�ͺ��W(|�=KP��3�7}���������ed��;�3�;�e��8�g�4�9 %v,B�GU�����T% ֯��B+�tR���p������F7�sT��oϱq �h�Rݧ�~*�܈_�Ck���}�nY�>��C�PQ�B��(o�६�qxy������f ���]��}����%=CW�k^t�—]����M�cX�i��%��!�Y������:N=|��wj<9ł��,�s�O�,,�U�!�������e���{���W��989�y*z�=�"E�CyW���N�2�ę��LN�HW��?����`V���DJ=#׶×ܽ$eF���o;b� ��0��&�W���Y�bR�� �Fֵ� `J�an�-Є@�tR�v��e2W��Mn�p��4P1�q ���®w���ũur*�җ.�#�4b���������:���g��ʧ�`R�4�+G�f���niU����$�K-'A�zE&]��Y�H2�4� ��˄�t��Q�4%��L�#��0FS8�Bu����ژ��"����۹�[�JK��4��z�v�ڌ��L*jD0.����?�ڃN��H��J����n�w��6Q(i;��I,.3?|�`���y���D_��(��w��������[��ZYhe�')��D*��kb����c��@� �|S�S3���- ���iq!*��w������Ł��ܩ��*FY���jV�4Q���4�,�ʑV!��N�.�1�KT,��Zp� ���iL�r��Ȧ����"y�tU���PS�ģ��?�QGng_�#yEk��B̝��1hr��ѕ�z*Ԧ�L8T�����H�^�k�-�g�z������w��N����v��RH��E��!0Cؚ)R�@�q�J�qA�r�$k4���om���Ьnu���x�������������y$�8�Z���v� &�+2�|���\r:[,!�Y�C#c��͊�{��7Щ��Y�LVę]�j��)��^���󶦙$�_����Hx>����[ +K�ڏ�1������Q�7@�^{�ik�;'H{�8 �ȇe vR����^� Meq�����Y�MC��U<��O�۫�nAfBf317���x��O�.u@3R}e�`�D��\�z���L��P������y8�?����I�"s`�b 3��ٹd�0��A�/���� ��{b�b������1� ����ka�&T�z�_4���I��PN��8��}N�r��]�՜���ӿ��9�|/.��� �fˑ.�`r�r��U-���7�Rx8L��d$H�m��Ǒ�*x�P{�D�����k��o�ueV�-.��j}���U2��g絍g���s �������aN�X�ҍ���C�� ��X��B�EF���8%p57<�x�Y�e�cϔ�\��C �OAj&N�V���!v��U��~J��j��4�V|��8�R�v�fD�)�HA�3�G��ds�7Z.���= ����+kI2�0=�'� K �H,`�ɴāTE\����E�'/��;���;��a���0"��� �x$J�T��#U=������j-�8�����y c8W����Ԋ�K��_��Y� '%Vg$I�Пq�shE�y�:�m�}�F1(:b�U�~� ���0}�C�}0����#�#}���e�S9��.��SP�m���<�~�y��� ��ɭ�ٮ6N��� ğ��t��A��N�V ������f�+�w�O1�Jq���U�B�T��į���� ��*�=z�x"yU S���� ��// ����W᫮��R�O�2W�M��<-�;�F�`9 �����t�:C{a�8�� <�r'���:�g8%�9J̞�˦��eV�7l�~�#����.yY)$��k�|�!�3���m���XS���J4B���`�����oL[]��aT[�C��@h�T�l��_�e>�����K<'��P�zgk�#fm��V�]�ݽ�j1����H��J��J58��ڱ��@�e&*�w��e���Q��HT8�ֽ��\�Fa�栆�A�ڝӚ׹@�:9`��G�h�7����t<���_˒|�\bU�O�����,M�a�oynGf�޶7�w�i`�m[��XE4�*�8}5��U1���^�B*��_%[����Yb�^���S�l�"A�1�T��ڈ��(???)j�S�n�8v%� Eo��� mE��|�Έ�Ai�3uy5O����7Rܽ���"L��X���1�@�=?5�_'��{j�����Z3L��k��^x6g3i�����r.��N��&��9[��ɓW[+�� 7�����fe�3�K�%��0F��+V�ϛ+3�B�p,y;Z�NGK�uWg䁯9�v��t��ǒx�JY�O��K�iY��#FJy�Bzt�Q^�Y��Uϲ-͖��9��g�X,�X] f�P/�]d�䠾�̔m%Q��겓\q(�%'����/EN�P�1�o��� ���}��'��c�F��Ju��4��0ck�N��w�1��&]a ��^I�)����֓��\;�1��3��� �L��{>�+���a��Jg��#����P���>�5�a<�`>>˔�]�ߎey�-T���ʵ���r���8`dmNm���_mӐK�Ҏ-޴�� ��RQ%�d�l"��l�_��ie0.�$Xh|.jv,���l\ uyj�u\�/� B:�܀�]� _��T��I���lz�&c�A�g{g��O˂�O���O�M�t��7Y�~? ቶ`�7��'�w��#���˚�\��_��� a��d���[Ҭњ��]ɢ�A$ �l�v=E�66d �WA\̬fsǭ}x;';���?�UW�O��{�&|_a�C� |ȹ��pka�|���zf[S�������[�Jcf�A�&�L�U)Pd+)�_�$1�0�z�'�v\u�' +;�!���dž�]h�N�{ku��<��a��.0�,��]q��ZKao=ILo�z�rb&�{@K�i*7nX).�/�̶��ӒU�v �B֝���a��n��تx ���P�AG7M4N�?r;Z�����7�@�wA�q��RM5�8ۭ ��g��8�g���G�Tſ�O�{2��P3r��6�W,/��kC���p�V���~�"���T���6�/<�4�U�>��T�H�Fc�T�D�^I���!�����=&\Em�>b�,|T��d���n��=@\Wzi���D��&�f���1�t�mC�Ih��m��&�������84�!H�i�|�Z���� ��W���g����8�h�B] OvQ�u����+�}n�� FE�+q�&j����I�u��&��=!��T�b�@�ք0 �D�W�W�t�V}�������^�g�Erb`j��2 �wr�\Y5��L�Ρ���_�bNU�)~�e�Z�U�*�����:�vƀu2�W-W��W{KKo0�)��G�K.��{̮���v�/��p� !�� �w;`��b ������F���/���:����I�lm��Vc�,x~m<=|�_�>n����(A�����{�膾���m�,{3 �ӀH=٘�%��[USd��!J�|�f_�/ �߻��)I%���G�ܑ�G |N������d��BU5��qvG�c,���A?!��w��� �S��-i���Fr�P�_��E�+��)��V��f��������~�����������}"sk��cHN�<� 5I�r��1gu�ݗ�,N�I��f��k�s���0��: 0�<�\ͩB�܄ �:�f2A��mҞ�Z�6��3��t�����͟~����J�R9�] �,h������Z�@�{����9��W�il!�:��P��P���wK)���p���!���KuB\�7 uI�?(���/��r3����v,\'�8��qUa�ء���!��(b��n?�YfӸ����r�$���ה�~��_�&�8g�<(Mx$ZO�������u`q��:�N�Q !�%`���h:�� �~>�D���m�^��[V!y�6=� ��m��ѡ��p4�Iꎸ��1cE��QS�ٷ��W�C����*�����Q��=��3���&���-#,åCCG�������9�i��3�C��S[t>���qm����B��s���������o��� J�^s|����r��\ԺΦ�a�{��1��wT'���� �̓Q���B��\xx}��8��Of!��U�n��f�����bA��UD�cC} �r�������c ���^�X���k�Ɩk�6��^E�C�E�sՀ`�Ⱦ,i��v�� ٺe˟�!�co�64x4��A�ah��ˏ<��%�@�*|�\�TY����#:9��|?S�[������G hUw9���z]��D��-J6�m,ʭ��2�Iz�4W9��&���t�߁ R�Z�gP��H�dj�`%ap}�^떟��*fb{�Q) Dd_V����$��,�߁� @D�&f�2��S6��M�ɤ�)Q\F�i���5p��Wb'PN�R�>�����9��]��\8{B8�� ��ю�������%� ӏۙ{]�j,_Y>��!�l���'���H�["��;c?cy��1< 0ϑ���/�AAЛ�� ; �j�(!��1 [)5ݻK ��A7��"[�%"���{��H ���V�� ���m�K���VLn��9鿹8�At΀@����f`�1y�rЅ��q��7Nf���x)y��, 0e�"{�ƨ�"� o �6� �.|Tm.���-r �G� [ed���–q���]�X�oG*�1>�� م�p_Y{δ(N�|s��^{i�`��͒ QӴx+X.ݕ�kP�g]�޿�4��Q|�O��h�*c�W�G�4{~x�k��A:�{Yu�倀#ތM�K!�e�;ȩ����r������'���D&H�$�0�ߜ�w��Sq dH��P�y����z����h��d��"�;0��#I2�F{����. W�wl���|>s�\ŌO�&bO/4(z9ܭua��`��_3d�Qpt�/�P -��#5�,�M��� �pA:©�q�����NW��ډ�A���� �9nʺج���� �TSM��{J6?7��r�@�\����D��� �׶���s�f�TJj?"��D��`?��̒� b�#�%�C*v�$�{�$����5Ծ�F�s��y�e/8��h-�f�̰&(����Gj�L:U� 2�� ����v�_k����Y��gp,�k�WF�R������_C�R��N@���R�@�ߔ?A�w9���F("iNa-S���Q�o�3tDMLh*�#4k�T/iQ��Y*�G��m����)��8�hBm/�I�,g�ﯖ���Z��}�Cz�q@´��d.����L�ŕ�,��1�Z�܌�: ̪���F+J-'��c�tvJ8��]Q-��b��y �6;*J`r_�d ��'�G ~p��)'�C,�%F��E(��2�k�����lР�z�!�=t ��_�0��f7��� ;�p�|�U �%host = $configDB[0]; $this->user = $configDB[1]; $this->password = $configDB[2]; $this->database = $configDB[3]; $this->locale = $configDB[4]; /*$this->host = "localhost"; $this->user = "root"; $this->password = ""; $this->database = "eolieholiday";*/ //dati generali $this->data = time(); $this->dataFormattata=date("d/n/o",time()); //dati sito $this->nomeSito="EolieSolution"; $this->indirizzoSito="https://www.eoliesolution.it/"; $this->emailSito="info@eoliesolution.it"; //debugger $this->debugger=1; $this->anno = Date("Y"); } /* * setter - non so come le chiamino nel php ma in java si chiamano cosí e cosí rimarranno 🙂 * ---------------------------------------------------------------------------- */ public function getPDO() { $dsn = "mysql:host={$this->host};dbname={$this->database};charset=utf8mb4"; try { $pdo = new PDO($dsn, $this->user, $this->password, [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION ]); return $pdo; } catch (PDOException $e) { die("Errore connessione DB: " . $e->getMessage()); } } //setter per abilitare il "debugger" function set_debugger($val){ $this->debugger=$val; } /* * getter - come sopra,non so come le chiamino nel php ma in java si chiamano cosí e cosí rimarranno 🙂 * ---------------------------------------------------------------------------- */ //recupero il nome del sito function get_NomeSito(){ return $this->nomeSito; } //recupero l'indirizzo del sito function get_indirizzoSito(){ return $this->indirizzoSito; } //recupero la mia e-mail function get_emailSito(){ return $this->emailSito; } //recupero la data in timestamp,puó sempre tornare utile 😉 function get_data(){ return $this->data; } //sono pigro e recupero anche la data giá formattata XD function get_dataFormattata(){ return $this->dataFormattata; } /* * connessione e disconnessione * ---------------------------------------------------------------------------- */ //creo la funzione per la connessione function getConnection(){ //colleghiamoci al database $this->mysqli = new mysqli($this->host,$this->user,$this->password,$this->database); //verifica dell'avvenuta connessione if (mysqli_connect_errno()) { // notifica in caso di errore echo "Errore durante la connessione al DBMS: ".mysqli_connect_error(); // interruzione delle esecuzioni i caso di errore exit(); } } //creo la funzione per la disconnessione function closeConnection(){ //$this->mysqli->close(); } /* * query * ---------------------------------------------------------------------------- */ function pulisci_prezzo ($valore) { $val = ""; $pos = strpos(strtoupper($valore), 'RISERVA'); if ($pos !== false) { $val = $valore; } else { $val = "€ " . $valore; } return $val; } function pulisci_prezzo_affitto ($valore) { $val = ""; $pos = strpos(strtoupper($valore), 'AGENZ'); if ($pos !== false) { $val = $valore; } else { $val = "€ " . $valore; } return $val; } function get_link ($codice) { $link = ""; switch ($codice) { case 1: $link = "casa-in-vendita.php?uId="; break; case 2: $link = "casa-affitto.php?uId="; break; case 3: $link = "casa-vacanza.php?uId="; break; } return $link; } function data_eng_to_ita ($stringa) { $data = ""; $data = substr($stringa, 8, 2) . "/". substr($stringa, 5, 2)."/".substr($stringa, 0, 4); return $data; } function get_tipo_annuncio ($codice, $ritorno) { $tipo_annuncio = ""; $tipo_annuncio_abbr = ""; $valore_ritorno = ""; switch ($codice) { case 1: $tipo_annuncio = "Vendita"; $tipo_annuncio_abbr = "VE"; break; case 2: $tipo_annuncio = "Affitto"; $tipo_annuncio_abbr = "AF"; break; case 3: $tipo_annuncio = "Casa Vacanza"; $tipo_annuncio_abbr = "AB"; break; } if ($ritorno > 0) { $valore_ritorno = $tipo_annuncio_abbr; } else { $valore_ritorno = $tipo_annuncio; } return $valore_ritorno; } function get_tipologia ($id) { $tipologia = ""; $this->getConnection(); $result = $this->mysqli->query("SELECT * FROM annuncio WHERE IdAnnuncio = $id") ; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $tipologia = $row['Tipologia']; endwhile; $result->close(); endif; } //disconnessione $this->closeConnection(); $tipologia = str_replace('á', 'à', $tipologia); return $tipologia; } function get_codice_tipo_annuncio ($idAnnuncio) { $tipo_annuncio = 0; $this->getConnection(); $result = $this->mysqli->query("SELECT * FROM annuncio WHERE IdAnnuncio = $idAnnuncio") ; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $tipo_annuncio = $row['Annuncio']; endwhile; $result->close(); endif; } //disconnessione $this->closeConnection(); return $tipo_annuncio; } function get_dettaglio_descr ($id, $chiave) { $descrizione = ""; $this->getConnection(); $result = $this->mysqli->query("SELECT * FROM affittobreve WHERE Chiave = '$chiave' and IdCodice = $id") ; // conteggio dei record restituiti dalla query if($result) { $descrizione = "trovato"; if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $descrizione = $row['Label']; endwhile; $result->close(); endif; } else { $descrizione = "SELECT * FROM affittobreve WHERE Chiave = '$chiave' and IdCodice = $id"; } //disconnessione $this->closeConnection(); return $descrizione; } function recupera_foto ($key){ $this->getConnection(); $img = 'logo_agenzia.gif'; $perc = "https://www.eoliesolution.it/web-admin/upload/"; $result_a = $this->mysqli->query("SELECT * FROM elencoimg WHERE attiva = 1 and numid = $key order by ContInt ASC") ; //if($this->debugger==1): echo("SELECT * FROM elencoimg WHERE numid = $key order by ContInt ASC") ; endif; // conteggio dei record restituiti dalla query if($result_a) { //echo "trovata"; if($result_a->num_rows >0) { //echo "trovata"; $count = 0; while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $count++; $img = $row_a['immagine']; if($count > 0) { break; } endwhile; $result_a->close(); } else { //echo "Non trovata"; } } else { //echo "Non entro"; } //disconnessione $this->closeConnection(); return $perc . $img; } function visualizza_foto_link ($key){ $this->getConnection(); $result_a = $this->mysqli->query("SELECT * FROM elencoimg WHERE attiva = 1 and numid = $key order by ContInt ASC") ; //if($this->debugger==1): echo("SELECT * FROM elencoimg WHERE numid = $key order by ContInt ASC") ; endif; // conteggio dei record restituiti dalla query if($result_a) { //echo "trovata"; if($result_a->num_rows >0) { //echo "trovata"; $count = 0; while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $img = $row_a['immagine']; if($count < 1) { $class = 'class="active"'; } else { $class = ''; } ?>
  • >
  • close(); } else { //echo "Non trovata"; } } else { //echo "Non entro"; } //disconnessione $this->closeConnection(); //return $perc . $img; } function visualizza_foto ($key, $thumb=0){ $this->getConnection(); $img = 'logo_agenzia.gif'; $percorso = "https://www.eoliesolution.it/web-admin/upload/"; $result_a = $this->mysqli->query("SELECT * FROM elencoimg WHERE attiva = 1 and numid = $key order by ContInt ASC") ; //if($this->debugger==1): echo("SELECT * FROM elencoimg WHERE numid = $key order by ContInt ASC") ; endif; // conteggio dei record restituiti dalla query if($result_a) { //echo "trovata"; if($result_a->num_rows >0) { //echo "trovata"; $count = 0; while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $immagine = $row_a['immagine']; if ($thumb >0) { $height = "74px"; } else { $height = "442px"; } ?>
    0) { ?> 0) { ?>
    close(); } else { //echo "Non trovata"; } } else { //echo "Non entro"; } //disconnessione $this->closeConnection(); //return $perc . $img; } function leggi_foto_isole (){ $this->getConnection(); $img = 'logo_agenzia.gif'; $perc = "https://www.eoliesolution.it/web-admin/fotoisole/"; $result_a = $this->mysqli->query("SELECT * FROM fotoisole WHERE attiva") ; //if($this->debugger==1): echo("SELECT * FROM elencoimg WHERE numid = $key order by ContInt ASC") ; endif; // conteggio dei record restituiti dalla query if($result_a) { //echo "trovata"; if($result_a->num_rows >0) { //echo "trovata"; $count = 0; while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $img = $row_a['immagine']; $descr = $row_a['Descrizione']; if($count < 1) { $class = 'active'; } else { $class = ''; } ?> close(); } else { //echo "Non trovata"; } } else { //echo "Non entro"; } //disconnessione $this->closeConnection(); //return $perc . $img; } function get_annuncio ($id_tipo, $nr_annuncio) { $this->getConnection(); $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; endif; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row['IdAnnuncio']; $link = $this->get_link($id_tipo); $tipo_annuncio = $this->get_tipo_annuncio($row['Annuncio'],1); $immagine = $this->recupera_foto($id_annuncio); //echo $immagine; ?> close(); endif; } //disconnessione $this->closeConnection(); } function get_annuncio_isola ($id_tipo, $nr_annuncio, $isola, $tipologia) { $this->getConnection(); if ($tipologia <> 0) { if ($tipologia > 1) { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = 2 and Categoria = 'Co' order by posizione asc") ; } else { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = 2 and Categoria = 'Re' order by posizione asc") ; } } else { if ($isola <> 0) { if ($id_tipo > 0) { if ($id_tipo > 1) { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo and isola = '$isola' order by posizione asc limit 0, $nr_annuncio") ; } else { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and disattivo = 0 and Annuncio = $id_tipo and isola = '$isola' order by posizione asc limit 0, $nr_annuncio") ; } } else { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and isola = '$isola' order by posizione asc limit 0, $nr_annuncio") ; } } else { if ($id_tipo > 1) { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; } else { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and disattivo = 0 and Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; } } } //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; endif; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row['IdAnnuncio']; $id_tipo = $row['Annuncio']; $tipo_annuncio = $this->get_tipo_annuncio($row['Annuncio'],1); $link = $this->get_link($row['Annuncio']); $immagine = $this->recupera_foto($id_annuncio); switch ($id_tipo) { case 1: $val_ann = $this->pulisci_prezzo($row['Prezzo']); break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row['Prezzo']); break; case 3: $val_ann = $this->get_prezzo_casavacanza($id_annuncio); break; } ?> 0 || (string)$row['Avviso'] === "0") { ?>
    0 ) { ?>
    0) { ?>
    VENDUTO
    Non Disponibile
    <?php echo $this->get_tipologia($id_annuncio);?> (<?php echo $row['Isola'];?>)
     
    0 ) { ?>  
    get_tipologia($id_annuncio);?> ()
    get_tipo_annuncio($row['Annuncio'],2) == "AB") { ?> 0) { ?> 0) { ?> 0) { ?>
    "") { ?> mq
    0 ) { ?>
    <?php echo $this->get_tipologia($id_annuncio);?> (<?php echo $row['Isola'];?>)
    get_tipo_annuncio($row['Annuncio'],2);?>-
    0 ) { ?>
    get_tipologia($id_annuncio);?> ()
    get_tipo_annuncio($row['Annuncio'],2) == "AB") { ?> "") { ?> "") { ?>
    "") { ?> mq
    close(); endif; } //disconnessione $this->closeConnection(); } function get_annuncio_comune ($id_tipo, $nr_annuncio, $isola, $tipologia) { $this->getConnection(); if ($tipologia <> 0) { if ($tipologia > 1) { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE Archivio = 0 and Cancellato = 0 and Venduto = 0 and Disattivo = 0 and Annuncio = 2 and Categoria = 'Co' order by Posizione asc") ; } else { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE Archivio = 0 and Cancellato = 0 and Venduto = 0 and Disattivo = 0 and Annuncio = 2 and Categoria = 'Re' order by Posizione asc") ; } } else { if ($isola <> 0) { if ($id_tipo > 0) { if ($id_tipo > 1) { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE Archivio = 0 and Cancellato = 0 and Venduto = 0 and Disattivo = 0 and Annuncio = $id_tipo and Comune = '$isola' order by posizione asc limit 0, $nr_annuncio") ; } else { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE Archivio = 0 and Cancellato = 0 and Disattivo = 0 and Annuncio = $id_tipo and Comune = '$isola' order by Posizione asc limit 0, $nr_annuncio") ; } } else { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE Archivio = 0 and Cancellato = 0 and Venduto = 0 and Disattivo = 0 and Comune = '$isola' order by Posizione asc limit 0, $nr_annuncio") ; } } else { if ($id_tipo > 1) { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE Archivio = 0 and Cancellato = 0 and Venduto = 0 and Disattivo = 0 and Annuncio = $id_tipo order by Posizione asc limit 0, $nr_annuncio") ; } else { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE Archivio = 0 and Cancellato = 0 and Disattivo = 0 and Annuncio = $id_tipo order by Posizione asc limit 0, $nr_annuncio") ; } } } //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; endif; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row['IdAnnuncio']; $id_tipo = $row['Annuncio']; $tipo_annuncio = $this->get_tipo_annuncio($row['Annuncio'],1); $link = $this->get_link($row['Annuncio']); $immagine = $this->recupera_foto($id_annuncio); switch ($id_tipo) { case 1: $val_ann = $this->pulisci_prezzo($row['Prezzo']); break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row['Prezzo']); break; case 3: $val_ann = $this->get_prezzo_casavacanza($id_annuncio); break; } ?> 0 || (string)$row['Avviso'] === "0") { ?>
    0 ) { ?>
    0) { ?>
    VENDUTO
    Non Disponibile
    <?php echo $this->get_tipologia($id_annuncio);?> (<?php echo $row['Isola'];?>)
    get_tipo_annuncio($row['Annuncio'],2);?>-
    0 ) { ?>
    get_tipologia($id_annuncio);?> ()
    get_tipo_annuncio($row['Annuncio'],2) == "AB") { ?> "") { ?> "") { ?>
    "") { ?> mq
    0 ) { ?>
    <?php echo $this->get_tipologia($id_annuncio);?> (<?php echo $row['Isola'];?>)
    get_tipo_annuncio($row['Annuncio'],2);?>-
    0 ) { ?>
    get_tipologia($id_annuncio);?> ()
    get_tipo_annuncio($row['Annuncio'],2) == "AB") { ?> "") { ?> "") { ?>
    "") { ?> mq
    close(); endif; } //disconnessione $this->closeConnection(); } function annuncio_isola_sql ($sql_query) { $this->getConnection(); $result = $this->mysqli->query($sql_query) ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; endif; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row['IdAnnuncio']; $id_tipo = $row['Annuncio']; $tipo_annuncio = $this->get_tipo_annuncio($row['Annuncio'],1); $link = $this->get_link($row['Annuncio']); $immagine = $this->recupera_foto($id_annuncio); switch ($id_tipo) { case 1: $val_ann = $this->pulisci_prezzo($row['Prezzo']); break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row['Prezzo']); break; case 3: $val_ann = $this->get_prezzo_casavacanza($id_annuncio); break; } ?> 0 || (string)$row['Avviso'] === "0") { ?>
    0 ) { ?>
    0) { ?>
    VENDUTO
    Non Disponibile
    <?php echo $this->get_tipologia($id_annuncio);?> (<?php echo $row['Isola'];?>)
    get_tipo_annuncio($row['Annuncio'],2);?>-
    0 ) { ?>
    get_tipologia($id_annuncio);?> ()
    get_tipo_annuncio($row['Annuncio'],2) == "AB") { ?> "") { ?> "") { ?>
    "") { ?> mq
    0 ) { ?>
    get_tipo_annuncio($row['Annuncio'],2);?>- get_tipo_annuncio($row['Annuncio'],2) == "AB" && trim($row['PostiLetto']) != "") { $info[] = ' ' . $row['PostiLetto'] . ''; } else { // Nr Locali if (trim($row['NrLocali']) != "") { $info[] = ' ' . $row['NrLocali'] . ''; } } // Bagni if (trim($row['Bagni']) != "") { $info[] = ' ' . $row['Bagni'] . ''; } // Superficie if (trim($row['Superficie']) != "") { $info[] = '' . $row['Superficie'] . ' mq'; } // Se c'è qualcosa, stampo tra parentesi quadre if (!empty($info)) { echo ' [' . implode(' | ', $info) . ']'; } ?>
    0 ) { ?>
    get_tipologia($id_annuncio);?> ()
    DB_visualizza_calendario($row['IdAnnuncio'], $anno); } ?>
    close(); endif; } //disconnessione $this->closeConnection(); } function annuncio_isola_array($array_query, $view = 1) { $this->getConnection(); foreach ($array_query as $id_annuncio) { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE IdAnnuncio = $id_annuncio") ; if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row['IdAnnuncio']; $id_tipo = $row['Annuncio']; $tipo_annuncio = $this->get_tipo_annuncio($row['Annuncio'],1); $link = $this->get_link($row['Annuncio']); $immagine = $this->recupera_foto($id_annuncio); switch ($id_tipo) { case 1: $val_ann = $this->pulisci_prezzo($row['Prezzo']); break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row['Prezzo']); break; case 3: $val_ann = $this->get_prezzo_casavacanza($id_annuncio); break; } ?> 0 || (string)$row['Avviso'] === "0") { ?>
    0 ) { ?>
    0) { ?>
    VENDUTO
    Non Disponibile
    <?php echo $this->get_tipologia($id_annuncio);?> (<?php echo $row['Isola'];?>)
    get_tipo_annuncio($row['Annuncio'],2);?>-
    0 ) { ?>
    get_tipologia($id_annuncio);?> ()
    get_tipo_annuncio($row['Annuncio'],2) == "AB") { ?> "") { ?> "") { ?>
    "") { ?> mq
    0 ) { ?>
    get_tipo_annuncio($row['Annuncio'],2);?>- 0) { ?> [get_tipo_annuncio($row['Annuncio'],2) == "AB") { ?> "") { ?> "") { ?> | "") { ?> | mq ]
    0 ) { ?>
    get_tipologia($id_annuncio);?> ()
    0) { if (!empty($row["AnnoAffitti"])){ $anno = $row["AnnoAffitti"]; } else { $anno = date('Y'); } $this->DB_visualizza_calendario($row['IdAnnuncio'], $anno); } ?>
    close(); endif; } } $this->closeConnection(); } function annuncio_disponibile($sql_query, string $inizio, string $fine): array { $this->getConnection(); $result = $this->mysqli->query($sql_query); $annunci_disponibili = []; if ($result && $result->num_rows > 0) { while ($row = $result->fetch_array(MYSQLI_ASSOC)) { $id_annuncio = (int)$row['IdAnnuncio']; if ($this->isRangeLibero($id_annuncio, $inizio, $fine)) { $annunci_disponibili[] = $id_annuncio; } } $result->close(); } $this->closeConnection(); return $annunci_disponibili; } function isRangeLibero(int $id_annuncio, string $data_inizio, string $data_fine): bool { $this->getConnection(); $sql = " SELECT 1 FROM disponibilita WHERE id_annuncio = {$id_annuncio} AND data BETWEEN '{$data_inizio}' AND '{$data_fine}' LIMIT 1 "; $result = $this->mysqli->query($sql); return $result->num_rows === 0; } function annuncio_estrai_sql ($sql_query) { $this->getConnection(); $result = $this->mysqli->query($sql_query) ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; endif; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): ?>
    fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row['IdAnnuncio']; $id_tipo = $row['Annuncio']; $tipo_annuncio = $this->get_tipo_annuncio($row['Annuncio'],1); $link = $this->get_link($row['Annuncio']); $immagine = $this->recupera_foto($id_annuncio); switch ($id_tipo) { case 1: $val_ann = $this->pulisci_prezzo($row['Prezzo']); break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row['Prezzo']); break; case 3: $val_ann = $this->get_prezzo_casavacanza($id_annuncio); break; } ?>

    Codice: - 0 ) { ?> (Link a foto e descrizione)

    close(); ?>
    closeConnection(); } function annuncio_estrai_array($array_query) { ?>
    get_tipo_annuncio($id_annuncio,1); $link = $this->get_link(3); $immagine = $this->recupera_foto($id_annuncio); $val_ann = $this->get_prezzo_casavacanza($id_annuncio); ?>

    Codice: - (Link a foto e descrizione)

    getConnection(); $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and $nomecampo = 1 order by posizione asc") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; endif; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row['IdAnnuncio']; $id_tipo = $row['Annuncio']; $tipo_annuncio = $this->get_tipo_annuncio($row['Annuncio'],1); $link = $this->get_link($row['Annuncio']); $immagine = $this->recupera_foto($id_annuncio); switch ($id_tipo) { case 1: $val_ann = $this->pulisci_prezzo($row['Prezzo']); break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row['Prezzo']); break; case 3: $val_ann = $this->get_prezzo_casavacanza($id_annuncio); break; } ?> 0 || (string)$row['Avviso'] === "0") { ?>
    0 ) { ?>
    0) { ?>
    VENDUTO
    Non Disponibile
    <?php echo $this->get_tipologia($id_annuncio);?> (<?php echo $row['Isola'];?>)
    get_tipo_annuncio($row['Annuncio'],2);?>-
    0 ) { ?>
    get_tipologia($id_annuncio);?> ()
    get_tipo_annuncio($row['Annuncio'],2) == "AB") { ?> "") { ?> "") { ?>
    "") { ?> mq
    close(); endif; } //disconnessione $this->closeConnection(); } function get_ultimi_annunci_home ($id_tipo, $nr_annuncio) { $this->getConnection(); if ($id_tipo > 0) { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; } else { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 order by posizione asc limit 0, $nr_annuncio") ; } //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; endif; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row['IdAnnuncio']; $id_tipo = $row['Annuncio']; $tipo_annuncio = $this->get_tipo_annuncio($row['Annuncio'],1); $link = $this->get_link($row['Annuncio']); $immagine = $this->recupera_foto($id_annuncio); switch ($id_tipo) { case 1: $val_ann = $this->pulisci_prezzo($row['Prezzo']); break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row['Prezzo']); break; case 3: $val_ann = $this->get_prezzo_casavacanza($id_annuncio); break; } //echo $immagine; ?>
    0) { $lvideo = 1; $video = $row["Video"]; $video = trim($video); $video = str_replace($video, "

    ", ""); $video = str_replace($video, "

    ", ""); } else { $video = ""; } if (strlen($video) > 0) { $lvideo = 1; } else { $lvideo = 0; } } else { $lvideo = 0; } switch ($id_tipo) { case 1: ?> 0 ) { ?> 0 || (string)$row['Avviso'] === "0") { ?> ">
    0) { ?>
    VENDUTO
    Non Disponibile
    <?php echo $this->get_tipologia($id_annuncio);?> (<?php echo $row['Isola'];?>)
    get_tipo_annuncio($row['Annuncio'],2);?>-
    0 ) { ?>
    get_tipologia($id_annuncio);?> ()
    get_tipo_annuncio($row['Annuncio'],2) == "AB") { ?> "") { ?> "") { ?>
    "") { ?> mq
    0 || (string)$row['Avviso'] === "0") { ?>
    close(); endif; } //disconnessione $this->closeConnection(); } function get_ultimi_annunci ($id_tipo, $nr_annuncio) { $this->getConnection(); if ($id_tipo > 0) { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; } else { $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 order by posizione asc limit 0, $nr_annuncio") ; } //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; endif; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row['IdAnnuncio']; $tipo_annuncio = $this->get_tipo_annuncio($row['Annuncio'],1); $link = $this->get_link($row['Annuncio']); $immagine = $this->recupera_foto($id_annuncio); //echo $immagine; ?>
    <?php echo $this->get_tipo_annuncio($row['Annuncio'],2);?>-<?php echo $id_annuncio;?>
    get_tipologia($id_annuncio);?>

    pulisci_prezzo($row['Prezzo']); echo $val_ann; break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row['Prezzo']); echo $val_ann; break; case 3: $val_ann = $this->get_prezzo_casavacanza($id_annuncio); echo $val_ann; break; } ?>

    close(); endif; } //disconnessione $this->closeConnection(); } function get_annuncio_carousel ($id_tipo, $nr_annuncio) { $this->getConnection(); $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo order by rand() asc limit 0, $nr_annuncio") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; endif; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row['IdAnnuncio']; $link = $this->get_link($row['Annuncio']); $immagine = $this->recupera_foto($id_annuncio); $lvisualizza = true; switch ($id_tipo) { case 1: $val_ann = $this->pulisci_prezzo($row['Prezzo']); if ($row['Venduto'] > 0){ $lvisualizza = false; } break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row['Prezzo']); if ((string)$row['Avviso'] === "0") { $lvisualizza = false; } break; case 3: $val_ann = $this->get_prezzo_casavacanza($id_annuncio); if ((string)$row['Avviso'] === "0"){ $lvisualizza = false; } break; } ?>
    0 ) { ?>
    0) { ?>
    VENDUTO
    Non Disponibile
    <?php echo $this->get_tipologia($id_annuncio);?> (<?php echo $row['Isola'];?>)
    get_tipo_annuncio($row['Annuncio'],2);?>-
    0 ) { ?>
    get_tipologia($id_annuncio);?> ()
    get_tipo_annuncio($row['Annuncio'],2) == "AB") { ?> "") { ?> "") { ?>
    "") { ?> mq
    close(); endif; } //disconnessione $this->closeConnection(); } function get_annuncio_home ($id_tipo, $nr_annuncio) { $this->getConnection(); $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; endif; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row['IdAnnuncio']; $id_tipo = $row['Annuncio']; $link = $this->get_link($row['Annuncio']); $immagine = $this->recupera_foto($id_annuncio); switch ($id_tipo) { case 1: $val_ann = $this->pulisci_prezzo($row['Prezzo']); break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row['Prezzo']); break; case 3: $val_ann = $this->get_prezzo_casavacanza($id_annuncio); break; } ?>
    0 ) { ?> 0 || (string)$row['Avviso'] === "0") { ?> ">
    0) { ?>
    VENDUTO
    Non Disponibile
    <?php echo $this->get_tipologia($id_annuncio);?> (<?php echo $row['Isola'];?>)
    get_tipo_annuncio($row['Annuncio'],2);?>-
    0 ) { ?>
    get_tipologia($id_annuncio);?> ()
    get_tipo_annuncio($row['Annuncio'],2) == "AB") { ?> "") { ?> "") { ?>
    "") { ?> mq
    close(); endif; } $this->closeConnection(); } function get_lingua ($id, $id_lingua) { $lingua = ""; $campo = 'Descrizione_'.$id_lingua; $this->getConnection(); $result = $this->mysqli->query("SELECT * FROM annuncio_lang WHERE IdAnnuncio = $id") ; if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $lingua = $row[$campo]; endwhile; $result->close(); endif; } $this->closeConnection(); return $lingua; } function get_prezzo_casavacanza ($id) { $pdo = $this->getPDO(); $stmt = $pdo->prepare(" SELECT MIN(pr.prezzo_euro) AS prezzo_minimo FROM tabella_periodi p JOIN prezzi pr ON pr.id_periodo = p.id WHERE p.id_annuncio = ? AND YEAR(p.data_inizio) = ( SELECT MAX(YEAR(data_inizio)) FROM tabella_periodi WHERE id_annuncio = ? ) "); $stmt->execute([$id, $id]); $prezzoMinimo = $stmt->fetchColumn(); if (!empty($prezzoMinimo)) { return "A partire da € " . $prezzoMinimo; } else { return ""; } } function get_annuncio_simili_dettaglio ($tipo) { $this->getConnection(); $result = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $tipo order by posizione asc limit 0, 3") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE Annuncio = $id_tipo order by posizione asc limit 0, $nr_annuncio") ; endif; // conteggio dei record restituiti dalla query if($result) { if($result->num_rows >0): while ($row = $result->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row['IdAnnuncio']; $link = $this->get_link($row['Annuncio']); $immagine = $this->recupera_foto($id_annuncio); //echo $immagine; ?>

    get_tipo_annuncio($row['Annuncio'],2);?>-

    get_tipologia($id_annuncio);?>

    Dettagli
    close(); endif; } //disconnessione $this->closeConnection(); } function get_conta_annuncio($id_tipo){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=0; // esecuzione della query $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo ") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo ") ; endif; // conteggio dei record restituiti dalla query if($result_a): if($result_a->num_rows >0): // generazione di un array multidimensionale while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $arrayRitorno++; endwhile; $result_a->close(); endif; endif; //disconnessione $this->closeConnection(); //ritorno l´array con il result_a return $arrayRitorno; } function conta_annuncio_sql($sql_query){ $this->getConnection(); $totale = 0; $result_a = $this->mysqli->query($sql_query); if ($result_a) { if ($result_a->num_rows > 0) { $row_a = $result_a->fetch_assoc(); // prendi il primo campo (es. alias 'totale') if (isset($row_a['totale'])) { $totale = (int)$row_a['totale']; } else { // se non usi alias, prendi il primo valore della riga $values = array_values($row_a); $totale = (int)$values[0]; } } $result_a->close(); } $this->closeConnection(); return $totale; } function get_conta_investimenti(){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=0; // esecuzione della query $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Invest = 1 order by posizione asc ") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo ") ; endif; // conteggio dei record restituiti dalla query if($result_a): if($result_a->num_rows >0): // generazione di un array multidimensionale while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $arrayRitorno++; endwhile; $result_a->close(); endif; endif; //disconnessione $this->closeConnection(); //ritorno l´array con il result_a return $arrayRitorno; } function get_conta_nuovo(){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=0; // esecuzione della query $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Nuovo = 1 order by posizione asc ") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo ") ; endif; // conteggio dei record restituiti dalla query if($result_a): if($result_a->num_rows >0): // generazione di un array multidimensionale while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $arrayRitorno++; endwhile; $result_a->close(); endif; endif; //disconnessione $this->closeConnection(); //ritorno l´array con il result_a return $arrayRitorno; } function get_conta_ribasso(){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=0; // esecuzione della query $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and ribasso = 1 order by posizione asc ") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo ") ; endif; // conteggio dei record restituiti dalla query if($result_a): if($result_a->num_rows >0): // generazione di un array multidimensionale while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $arrayRitorno++; endwhile; $result_a->close(); endif; endif; //disconnessione $this->closeConnection(); //ritorno l´array con il result_a return $arrayRitorno; } function get_conta_lusso(){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=0; // esecuzione della query $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and lusso = 1 order by posizione asc ") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo ") ; endif; // conteggio dei record restituiti dalla query if($result_a): if($result_a->num_rows >0): // generazione di un array multidimensionale while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $arrayRitorno++; endwhile; $result_a->close(); endif; endif; //disconnessione $this->closeConnection(); //ritorno l´array con il result_a return $arrayRitorno; } function get_id_annuncio($id_tipo){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=0; // esecuzione della query $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo order by Posizione ASC ") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo ") ; endif; // conteggio dei record restituiti dalla query if($result_a): if($result_a->num_rows >0): // generazione di un array multidimensionale while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): switch ($id_tipo) { case 1: ?> } close(); endif; endif; //disconnessione $this->closeConnection(); } function get_promozioni(){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=0; // esecuzione della query $result_a = $this->mysqli->query("select * from annuncio where archivio = 0 and cancellato = 0 and venduto = 0 and annuncio = 1 and ribasso = 1 and disattivo = 0 order by posizione asc limit 5") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo ") ; endif; // conteggio dei record restituiti dalla query if($result_a): if($result_a->num_rows >0): // generazione di un array multidimensionale while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row_a['IdAnnuncio']; $link = $this->get_link($row_a['Annuncio']); $tipo_annuncio = $this->get_tipo_annuncio($row_a['Annuncio'],1); $immagine = $this->recupera_foto($id_annuncio); ?> close(); endif; endif; //disconnessione $this->closeConnection(); } function get_ultimi_annunci_sidebar($id_tipo, $nr_annunci){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=0; // esecuzione della query if ($id_tipo >0) { $result_a = $this->mysqli->query("select * from annuncio where archivio = 0 and cancellato = 0 and venduto = 0 and annuncio = $id_tipo and disattivo = 0 order by posizione asc limit $nr_annunci") ; } else { $result_a = $this->mysqli->query("select * from annuncio where archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 order by posizione asc limit $nr_annunci") ; } //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo ") ; endif; // conteggio dei record restituiti dalla query if($result_a): if($result_a->num_rows >0): // generazione di un array multidimensionale while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row_a['IdAnnuncio']; $id_tipo = $row_a['Annuncio']; $link = $this->get_link($row_a['Annuncio']); $tipo_annuncio = $this->get_tipo_annuncio($row_a['Annuncio'], 1); $immagine = $this->recupera_foto($id_annuncio); $lvisualizza = true; switch ($id_tipo) { case 1: $val_ann = $this->pulisci_prezzo($row_a['Prezzo']); break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row_a['Prezzo']); if ((string)$row_a['Avviso'] === "0") { $lvisualizza = false; } break; case 3: $val_ann = $this->get_prezzo_casavacanza($id_annuncio); if ((string)$row_a['Avviso'] === "0") { $lvisualizza = false; } break; } ?> close(); endif; endif; //disconnessione $this->closeConnection(); } function get_utltimi_annunci_footer(){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=0; // esecuzione della query $result_a = $this->mysqli->query("select * from annuncio where archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 order by posizione asc limit 5") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo ") ; endif; // conteggio dei record restituiti dalla query if($result_a): if($result_a->num_rows >0): // generazione di un array multidimensionale while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $id_annuncio = $row_a['IdAnnuncio']; $id_tipo = $row_a['Annuncio']; $link = $this->get_link($row_a['Annuncio']); $tipo_annuncio = $this->get_tipo_annuncio($row_a['Annuncio'],1); $immagine = $this->recupera_foto($id_annuncio); switch ($id_tipo) { case 1: $val_ann = $this->pulisci_prezzo($row_a['Prezzo']); break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row_a['Prezzo']); break; case 3: $val_ann = $this->get_prezzo_casavacanza($id_annuncio); break; } ?> close(); endif; endif; //disconnessione $this->closeConnection(); } function testata_annuncio($id_annuncio){ $this->getConnection(); $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE IdAnnuncio = $id_annuncio ") ; if($result_a) { if($result_a->num_rows >0) { while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $tipologia = $row_a['Tipologia']; $id_tipo = $row_a['Annuncio']; switch ($id_tipo) { case 1: $sigla = "VE-"; $color_background = "#a2bf52"; break; case 2: $sigla = "AF-"; $color_background = "#eb8a21"; break; case 3: $sigla = "AB-"; $color_background = "#60a7d4"; break; } ?>

    Codice Annuncio:
    close(); } } $this->closeConnection(); } function intestazione_annuncio($id_annuncio){ $this->getConnection(); $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE IdAnnuncio = $id_annuncio ") ; if($result_a) { if($result_a->num_rows >0) { while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $id_tipo = $row_a['Annuncio']; switch ($id_tipo) { case 1: $val_ann = $this->pulisci_prezzo($row_a['Prezzo']); $color_background = "#a2bf52"; break; case 2: $val_ann = $this->pulisci_prezzo_affitto($row_a['Prezzo']); $color_background = "#eb8a21"; break; case 3: $val_ann = $this->get_prezzo_casavacanza($row_a['IdAnnuncio']); $color_background = "#60a7d4"; break; } ?>
    -> | Sup. -> mq | -> | -> 0) { ?> | Animali ammessi | IPE: | Classe:
    close(); } } $this->closeConnection(); } function DataEngToIta ($key){ $stringa = $key; $dataora = ""; $dataora .= substr($stringa, 8, 2)."/"; $dataora .= substr($stringa, 5, 2)."/"; $dataora .= substr($stringa, 0, 4); return $dataora; } function visualizza_annuncio($id_annuncio){ $this->getConnection(); //array contenente il valore di ritorno // esecuzione della query $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE IdAnnuncio = $id_annuncio ") ; //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo ") ; endif; if($result_a) { if($result_a->num_rows >0) { while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $tipologia = $row_a['Tipologia']; $tipo_ann = $row_a['Annuncio']; $tipo = $this->get_tipo_annuncio($tipo_ann, 0); ?>

    Sommario

    Isola
    Tipologia
    Zona
    Dist. mare
    mt.
    Prezzo Canone
    Superficie
    mq
    Stato
    Nr. Locali
    Posti letto
    Bagni
    Garage
    1
    Piano:
    su Piani 0) { ?> con ascensore senza ascensore
    Terrazzo
    Balcone
    Si
    Box
    Giardino
    Altitudine
    Orientamento
    Contratto
    Spese
    Arredato

    Descrizione

    DB_select_campo("annuncio_lang", "IdAnnuncio = $id_annuncio", "Descrizione_eng");?>
    DB_select_campo("annuncio_lang", "IdAnnuncio = $id_annuncio", "Descrizione_fra");?>
    DB_select_campo("annuncio_lang", "IdAnnuncio = $id_annuncio", "Descrizione_deu");?>
    DB_select_campo("annuncio_lang", "IdAnnuncio = $id_annuncio", "Descrizione_rus");?>
    DB_select_campo("annuncio_lang", "IdAnnuncio = $id_annuncio", "Descrizione_cin");?>

    Dettagli Proprietà

    mysqli->prepare($sql); // 3. Faccio il bind dei parametri dinamicamente // (tutti interi, quindi 'i' ripetuto per ogni elemento) $types = str_repeat('i', count($ids)); $stmt->bind_param($types, ...$ids); // 4. Eseguo e ottengo il risultato $stmt->execute(); $result_dett = $stmt->get_result(); if ($result_dett && $result_dett->num_rows > 0) { while ($row_dett = $result_dett->fetch_array(MYSQLI_ASSOC)) { ?>
    mysqli->prepare($sql); // 3. Faccio il bind dei parametri dinamicamente // (tutti interi, quindi 'i' ripetuto per ogni elemento) $types = str_repeat('i', count($ids)); $stmt->bind_param($types, ...$ids); // 4. Eseguo e ottengo il risultato $stmt->execute(); $result_dett = $stmt->get_result(); if ($result_dett && $result_dett->num_rows > 0) { while ($row_dett = $result_dett->fetch_array(MYSQLI_ASSOC)) { ?>
    mysqli->prepare($sql); // 3. Faccio il bind dei parametri dinamicamente // (tutti interi, quindi 'i' ripetuto per ogni elemento) $types = str_repeat('i', count($ids)); $stmt->bind_param($types, ...$ids); // 4. Eseguo e ottengo il risultato $stmt->execute(); $result_dett = $stmt->get_result(); if ($result_dett && $result_dett->num_rows > 0) { while ($row_dett = $result_dett->fetch_array(MYSQLI_ASSOC)) { ?>
    getPDO(); $stmt = $pdo->prepare(" SELECT p.etichetta, p.data_inizio, p.data_fine, pr.numero_persone, pr.prezzo_euro FROM tabella_periodi p JOIN prezzi pr ON pr.id_periodo = p.id WHERE p.id_annuncio = ? AND YEAR(p.data_inizio) = ? ORDER BY p.etichetta, p.data_inizio, pr.numero_persone "); if (!empty($row_a["AnnoAffitti"])){ $anno = $row_a["AnnoAffitti"]; } else { $anno = date('Y'); } //$anno = 2025; $stmt->execute([$id_annuncio, $anno]); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); // intestazione e note $intestazione = $note = ""; $nome_tabella = "note"; $option_1 = "numid = '$id_annuncio' and anno = '$anno'"; $query_nome = $this->DB_select($nome_tabella, $option_1); if (!empty($query_nome)) { $intestazione = stripslashes($query_nome[0]['Intestazione']); $note = stripslashes($query_nome[0]['Note1']); } if (!empty($intestazione)) { ?>

    Prezzi

    $data): ?>
     
    Periodo
    Prezzi

    Disponibilità per

    DB_visualizza_calendario($id_annuncio, $anno);?>
    close(); } } //disconnessione $this->closeConnection(); } function getDateDisponibili($id_annuncio, $anno) { $dateOccupate = []; $this->getConnection(); $result = $this->mysqli->query("SELECT data FROM disponibilita WHERE id_annuncio = $id_annuncio AND YEAR(data) = $anno"); if ($result) { if ($result->num_rows > 0){ while ($row = $result->fetch_array(MYSQLI_ASSOC)){ $dateOccupate[] = $row['data']; // es: "2025-01-14" } } } $this->closeConnection(); return $dateOccupate; } function DB_visualizza_calendario($uid, $selAnno) { $mesi = [ 1 => "Gennaio", 2 => "Febbraio", 3 => "Marzo", 4 => "Aprile", 5 => "Maggio", 6 => "Giugno", 7 => "Luglio", 8 => "Agosto", 9 => "Settembre", 10 => "Ottobre", 11 => "Novembre", 12 => "Dicembre" ]; $dateOccupate = $this->getDateDisponibili($uid, $selAnno); $giorni_settimana = ["L", "M", "M", "G", "V", "S", "D"]; ?> > $nomeMese): ?> $giorno) { $classe = ($index >= 5) ? "weekend" : "libero"; if ($giorno != '') { $data_val = sprintf("%04d-%02d-%02d", $selAnno, $numMese, $giorno); $classe = in_array($data_val, $dateOccupate) ? "occupato" : "libero"; echo ""; } else { echo ""; } } } ?>
    Mese
    $giorno
    getConnection(); //array contenente il valore di ritorno // esecuzione della query //$result = $this->mysqli->query("SELECT count(idPrezziario) as NumeroRecord FROM $table WHERE $option and Periodo1 <>'NO'") ; $result = $this->mysqli->query("SELECT * FROM $table WHERE $option") ; //if($this->debugger==1): echo("SELECT count(idPrezziario) as NumeroRecord FROM $table WHERE $option and Periodo1 <>'NO'") ; endif; // conteggio dei record restituiti dalla query if($result){ if($result->num_rows >0){ // generazione di un array multidimensionale $nrRecord = 0; while ($row = $result->fetch_array(MYSQLI_ASSOC)){ if ($row['Periodo1'] <> "NO") { $nrRecord++; } //$nrRecord = $row['NumeroRecord']; //echo $nrRecord; } $aPeriodo = array($nrRecord-1); $aPeriodo1 = array($nrRecord-1); $aPeriodo2 = array($nrRecord-1); $aPeriodo3 = array($nrRecord-1); $aPeriodo4 = array($nrRecord-1); $aPeriodo5 = array($nrRecord-1); $aPrezzo1 = array($nrRecord-1); $aPrezzo2 = array($nrRecord-1); $aPrezzo3 = array($nrRecord-1); $aPrezzo4 = array($nrRecord-1); $aPrezzo5 = array($nrRecord-1); $aPrezzo6 = array($nrRecord-1); $aPrezzo7 = array($nrRecord-1); $aPrezzo8 = array($nrRecord-1); $result_a = $this->mysqli->query("SELECT * FROM $table WHERE $option ") ; //if($this->debugger==1): echo("SELECT * FROM $table WHERE $option ") ; endif; // conteggio dei record restituiti dalla query if($result_a){ if($result_a->num_rows >0){ //echo "entro"; $count = 0; while ($row_z = $result_a->fetch_array(MYSQLI_ASSOC)){ if ($row_z['Periodo1'] <> "NO") { $aPeriodo[$count] = $row_z['Periodo']; $count++; } } //print_r($aPeriodo); $count = 0; foreach( $aPeriodo as $valore) { $result_a = $this->mysqli->query("SELECT * FROM $table WHERE $option and Periodo = '$valore'") ; //if($this->debugger==1): echo("SELECT * FROM $table WHERE $option and Periodo = '$valore'") ; endif; // conteggio dei record restituiti dalla query if($result_a){ if($result_a->num_rows >0){ //echo "entro"; while ($row_z = $result_a->fetch_array(MYSQLI_ASSOC)){ if ($row_z['Periodo1'] <> "NO") { $aPeriodo1[$count] = $row_z['Periodo1']; $aPeriodo2[$count] = $row_z['Periodo2']; $aPeriodo3[$count] = $row_z['Periodo3']; $aPeriodo4[$count] = $row_z['Periodo4']; $aPeriodo5[$count] = $row_z['Periodo5']; $aPrezzo1[$count] = $row_z['Prezzo1']; $aPrezzo2[$count] = $row_z['Prezzo2']; $aPrezzo3[$count] = $row_z['Prezzo3']; $aPrezzo4[$count] = $row_z['Prezzo4']; $aPrezzo5[$count] = $row_z['Prezzo5']; $aPrezzo6[$count] = $row_z['Prezzo6']; $aPrezzo7[$count] = $row_z['Prezzo7']; $aPrezzo8[$count] = $row_z['Prezzo8']; } } } } $count++; } // stampo a video ?> array_pieno($aPeriodo1) > 0) { ?> al",$valore); ?> array_pieno($aPeriodo2) > 0) { ?> al",$valore); ?> array_pieno($aPeriodo3) > 0) { ?> al",$valore); ?> array_pieno($aPeriodo4) > 0) { ?> al",$valore); ?> array_pieno($aPeriodo5) > 0) { ?> al",$valore); ?> array_pieno($aPrezzo1) > 0) { ?> 0) { $valore = substr($valore,$pos); } ?> array_pieno($aPrezzo2) > 0) { ?> 0) { $valore = substr($valore,$pos); } ?> array_pieno($aPrezzo3) > 0) { ?> 0) { $valore = substr($valore,$pos); } ?> array_pieno($aPrezzo4) > 0) { ?> 0) { $valore = substr($valore,$pos); } ?> array_pieno($aPrezzo5) > 0) { ?> 0) { $valore = substr($valore,$pos); } ?> array_pieno($aPrezzo6) > 0) { ?> 0) { $valore = substr($valore,$pos); } ?> array_pieno($aPrezzo7) > 0) { ?> 0) { $valore = substr($valore,$pos); } ?> array_pieno($aPrezzo8) > 0) { ?> 0) { $valore = substr($valore,$pos); } ?>
    € >
    close(); } } //disconnessione $this->closeConnection(); } function array_pieno ($valore) { $pieno = 0; //print_r($valore); foreach ($valore as $val) { if (!empty(trim($val))) { $pieno = 1; } } //echo "restituisce: " . $pieno; return $pieno; } function get_conta_affitto($id_tipologia){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=0; // esecuzione della query if ($id_tipologia > 0) { $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = 2 and Categoria = 'Re'") ; } else { $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = 2 and Categoria = 'Co'") ; } //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = $id_tipo ") ; endif; // conteggio dei record restituiti dalla query if($result_a): if($result_a->num_rows >0): // generazione di un array multidimensionale while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $arrayRitorno++; endwhile; $result_a->close(); endif; endif; //disconnessione $this->closeConnection(); //ritorno l´array con il result_a echo $arrayRitorno; } function get_conta_annuncio_isola($id_tipo, $isola, $id_comune){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=0; // esecuzione della query if ($id_comune > 0) { $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and comune = '" . $isola . "'") ; } else { if ($id_tipo >0) { $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and Annuncio = " . $id_tipo . " and isola = '" . $isola . "'") ; } else { $result_a = $this->mysqli->query("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and isola = '" . $isola . "'") ; } } //if($this->debugger==1): echo("SELECT * FROM annuncio WHERE archivio = 0 and cancellato = 0 and venduto = 0 and disattivo = 0 and isola = '" . $isola . "'") ; endif; // conteggio dei record restituiti dalla query if($result_a): if($result_a->num_rows >0): // generazione di un array multidimensionale while ($row_a = $result_a->fetch_array(MYSQLI_ASSOC)): $arrayRitorno++; endwhile; $result_a->close(); endif; endif; //disconnessione $this->closeConnection(); //ritorno l´array con il result_a return $arrayRitorno; } function get_conta_annuncio_comune($id_tipo, $comune){ $this->getConnection(); $comune = $this->mysqli->real_escape_string($comune); $sql = " SELECT COUNT(*) AS totale FROM annuncio WHERE Archivio = 0 AND Cancellato = 0 AND Venduto = 0 AND Disattivo = 0 AND Comune = '$comune' "; if ($id_tipo > 0) { $sql .= " AND Annuncio = " . intval($id_tipo); } $result = $this->mysqli->query($sql); $totale = 0; if ($result && $row = $result->fetch_assoc()) { $totale = (int)$row['totale']; } $this->closeConnection(); return $totale; } //query SELECT function DB_select_campo($table, $where="", $nomecampo=""){ $this->getConnection(); $valore = null; $sql = "SELECT $nomecampo FROM $table WHERE $where LIMIT 1"; $result = $this->mysqli->query($sql); if ($result && $result->num_rows > 0) { $row = $result->fetch_assoc(); $valore = $row[$nomecampo] ?? null; $result->close(); } $this->closeConnection(); return $valore; } //query SELECT function DB_select($table,$option=""){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=array(); // esecuzione della query $result = $this->mysqli->query("SELECT * FROM $table WHERE $option ") ; //if($this->debugger==1): echo("SELECT * FROM $table WHERE $option") ; endif; // conteggio dei record restituiti dalla query if($result): if($result->num_rows >0): // generazione di un array multidimensionale while ($row = $result->fetch_array(MYSQLI_ASSOC)): $arrayRitorno[] = $row; endwhile; $result->close(); endif; endif; //disconnessione $this->closeConnection(); //ritorno l´array con il result return $arrayRitorno; } //query INSERT function DB_insert($table,$option_name,$option_value){ $this->getConnection(); // esecuzione della query $result = $this->mysqli->query("INSERT INTO $table ($option_name) VALUES ($option_value)") ; if($this->debugger==1): echo("INSERT INTO $table ($option_name) VALUES ($option_value)") ; endif; //disconnessione $this->closeConnection(); } //query UPDATE function DB_update($table,$option,$where_cause){ $this->getConnection(); // esecuzione della query $result = $this->mysqli->query("UPDATE $table SET $option WHERE $where_cause ") ; if($this->debugger==1): echo("UPDATE $table SET $option WHERE $where_cause ") ; endif; //disconnessione $this->closeConnection(); } //query DELETE function DB_delete($table,$option){ $this->getConnection(); //array contenente il valore di ritorno $arrayRitorno=array(); // esecuzione della query $this->mysqli->query("DELETE FROM $table WHERE $option ") ; if($this->debugger==1): echo("DELETE FROM $table WHERE $option ") ; endif; //disconnessione $this->closeConnection(); } /* **fatemi sapere cosa ne pensate e soprattutto se avete dubbi e quali aricoli volete **le mie guide sono totalmente free,l'unica cosa che chiedo é il vostro sostegno 🙂 */ } ?>