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 �% 0) { while ($record_DOCU_AREA = mysql_fetch_array($recordset_DOCU_AREA)) { $nr_docu = $nr_docu + 1; } } return $nr_docu; } function aggiorna_visite_giornale($key) { $recordsetUser = mysql_query("SELECT * FROM giornale where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { $visto = $rec['visto'] + 1; } $esito = mysql_query("update giornale set visto = '" . $visto . "' WHERE id='".$key."'"); } function aggiorna_visite_docu($key) { $recordsetUser = mysql_query("SELECT * FROM documenti where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { $visto = $rec['visto'] + 1; } $esito = mysql_query("update documenti set visto = '" . $visto . "' WHERE id='".$key."'"); } function sostituisci_campi($stringa, $id, $pwd) { echo $id; $SQL_Conf = "SELECT * FROM configurazione where id = 1"; //echo $SQL; $recordset_Conf = mysql_query ($SQL_Conf) or die (mysql_error()); if (mysql_num_rows($recordset_Conf) > 0) { while ($record_Conf = mysql_fetch_array($recordset_Conf)) { $url_sito = "".$record_Conf['url_sito'].""; $link_login = "".$record_Conf['url_sito']."login.php"; $nome_sito = $record_Conf['nome_sito']; echo $nome_sito; $footer = $record_Conf['footer']; } } $SQL_1 = "SELECT * FROM x_users where cod_fisc = '".$id."'"; echo $SQL_1; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { //echo "entro"; while ($record_1 = mysql_fetch_array($recordset_1)) { if (strlen($record_1['cod_fisc']) > 0) { $username = $record_1['cod_fisc']; } else { $username = $record_1['email']; } echo $username; if (strlen($pwd) == 1) { if ($pwd == 1 ) { $password = "Cu-Bo!2016"; } else { $password = "Cu-Bologna"; } } else { $password = $pwd; } $stringa = str_replace('{#Nome}', $record_1['nome'], $stringa); $stringa = str_replace('{#Cognome}', $record_1['cognome'], $stringa); $stringa = str_replace('{#Email}', $record_1['email'], $stringa); $stringa = str_replace('{#Telefono}', $record_1['telefono'], $stringa); $stringa = str_replace('{#Cellulare}', $record_1['cellulare'], $stringa); $stringa = str_replace('{#CodiceFiscale}', $record_1['cod_fisc'], $stringa); $stringa = str_replace('{#Username}', $username, $stringa); $stringa = str_replace('{#Password}', $password, $stringa); $stringa = str_replace('{#LinkLogin}', $link_login, $stringa); $stringa = str_replace('{#UrlSito}', $url_sito, $stringa); $stringa = str_replace('{#Sito}', "".$nome_sito."", $stringa); } } else { //echo "non entro"; $stringa = str_replace('{#Sito}', "".$nome_sito."", $stringa); } return $stringa; } function sostituisci_campi_corso($stringa, $utente, $corso) { $SQL_Conf = "SELECT * FROM configurazione where id = 1"; //echo $SQL; $recordset_Conf = mysql_query ($SQL_Conf) or die (mysql_error()); if (mysql_num_rows($recordset_Conf) > 0) { while ($record_Conf = mysql_fetch_array($recordset_Conf)) { $url_sito = "".$record_Conf['url_sito'].""; $link_login = "".$record_Conf['url_sito']."login.php"; $url_sito2 = $record_Conf['url_sito']; $nome_sito = $record_Conf['nome_sito']; $footer = $record_Conf['footer']; } } $SQL_1 = "SELECT * FROM x_users where id = '".$utente."'"; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $nome = $record_1['nome']; $cognome = $record_1['cognome']; } } $SQL_1 = "SELECT * FROM corso where id = '".$corso."'"; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $link_corso = link_url($url_sito2 . "dettaglio-corso.php?id=".$corso,0); $dettagli_corso = "Corso: " . $record_1['titolo']; $dettagli_corso .= "
Data del corso: " . DataEngToIta($record_1['datacorso']); $dettagli_corso .= "
Maggiori informazioni: " . $link_corso . "Dettagli Corso"; } } $stringa = str_replace('{#Nome}', $nome, $stringa); $stringa = str_replace('{#Cognome}', $cognome, $stringa); $stringa = str_replace('{#UrlSito}', "".$url_sito2."", $stringa); $stringa = str_replace('{#DettagliCorso}', $dettagli_corso, $stringa); return $stringa; } function email_iscrizione(){ $SQL_1 = "SELECT * FROM conf_testi where id = 1"; $email_iscrizione = ""; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $email_iscrizione = $record_1['email_iscrizione']; } } return $email_iscrizione; } function email_iscrizione_corso(){ $SQL_1 = "SELECT * FROM conf_testi where id = 1"; $email_iscrizione_corso = ""; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $email_iscrizione_corso = $record_1['email_iscrizione_corso']; } } return $email_iscrizione_corso; } function email_conferma_iscrizione(){ $SQL_1 = "SELECT * FROM conf_testi where id = 1"; $email_conferma_iscrizione = ""; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $email_conferma_iscrizione = $record_1['email_conferma_iscrizione']; } } return $email_conferma_iscrizione; } function email_reset_pwd(){ $SQL_1 = "SELECT * FROM conf_testi where id = 1"; $email_iscrizione = ""; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $email_reset_pwd = $record_1['email_reset_pwd']; } } return $email_reset_pwd; } function email_recupera_pwd(){ $SQL_1 = "SELECT * FROM conf_testi where id = 1"; $email_recupera_pwd = ""; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $email_recupera_pwd = $record_1['email_recupera_pwd']; } } return $email_recupera_pwd; } function TagliaStringa($stringa, $max_char){ if(strlen($stringa)>$max_char){ $stringa_tagliata=substr($stringa, 0,$max_char); $last_space=strrpos($stringa_tagliata," "); $stringa_ok=substr($stringa_tagliata, 0,$last_space); return $stringa_ok."..."; }else{ return $stringa; } } function aggiorna_visite_eventi($key) { $recordsetUser = mysql_query("SELECT * FROM eventi where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { $visto = $rec['visto'] + 1; } $esito = mysql_query("update eventi set visto = '" . $visto . "' WHERE id='".$key."'"); } function aggiorna_visite_news($key) { $recordsetUser = mysql_query("SELECT * FROM news where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { $visto = $rec['visto'] + 1; } $esito = mysql_query("update news set visto = '" . $visto . "' WHERE id='".$key."'"); } function visualizza_tipo_utente($id, $come) { $sel1 = ""; $sel2 = ""; $sel3 = ""; $sel4 = ""; $sel5 = ""; if ($come == 1) { $sep = "
"; } else { $sep = " "; } switch ($id) { case 1: $sel1 = "checked"; break; case 2: $sel2 = "checked"; break; case 3: $sel3 = "checked"; break; case 4: $sel4 = "checked"; break; case 0: $sel5 = "checked"; break; } ?> value="1" type="radio" class="ace" /> Admin value="2" type="radio" class="ace" /> Socio value="3" type="radio" class="ace" /> Socio + Procedura value="4" type="radio" class="ace" /> Solo Procedura value="0" type="radio" class="ace" /> Utente Registrato value="1" /> Documenti  value="2" /> Corsi  value="3" /> News  value="4" /> Eventi  value="5" /> Vademecum  value="" /> ()  type="radio" class="ace" /> ()  0) { while ($record_1 = mysql_fetch_array($recordset_1)) { return $record_1['flag_noadmin']; } } } function recupera_sede($id){ $SQL_1 = "SELECT * FROM sedi where id=".$id; $sede = ""; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $sede = "SEDE ASSOCIATA

"; $sede .= "SEDE: " . stripslashes($record_1['sede']) . "
"; $sede .= "Regione: " .stripslashes(recupera_regione($record_1['regione']))."
"; $sede .= "Provincia: ".stripslashes(recupera_provincia($record_1['provincia']))."
"; $sede .= "Cod. Comune: ".$record_1['codcomune']."
"; $sede .= "Comune: ".stripslashes($record_1['comune'])."
"; $sede .= "Indirizzo: ".stripslashes($record_1['indirizzo'])."
"; $sede .= "CAP: ".$record_1['cap']."
"; $sede .= "Latitudine: ".$record_1['gmap_lat']."
"; $sede .= "Longitudine: ".$record_1['gmap_long']."
"; } } return $sede; } function recupera_nr_news(){ $SQL_1 = "SELECT * FROM x_virtualnews order by numero,anno asc"; $num_news = 0; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $num_news = $record_1['numero']; } } return $num_news; } function recupera_anno_news(){ $SQL_1 = "SELECT * FROM x_virtualnews order by numero,anno asc"; $anno_news = date("Y"); $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $anno_news = $record_1['anno']; } } return $anno_news; } function aggiornacomuni(){ $SQL_1 = "SELECT * FROM x_users where flag_attivo = 1"; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $idregione = recupera_idregionedaidprovincia($record_1['provincia']); $esito = mysql_query("update x_users set regione = " . $idregione . " WHERE id= ".$record_1['id']); } } } function verifica_iscrizione($id_corso,$idutente){ $SQL_1 = "SELECT * FROM iscrizioni where idutente = '".$idutente . "' and id_corso = '" . $id_corso . "'"; $verifica_iscrizione = false; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $verifica_iscrizione = true; } } return $verifica_iscrizione; } function verifica_iscrizione_eventi($id_corso,$idutente){ $SQL_1 = "SELECT * FROM iscrizioni where idutente = '".$idutente . "' and id_evento = '" . $id_corso . "'"; $verifica_iscrizione = false; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $verifica_iscrizione = true; } } return $verifica_iscrizione_eventi; } function verifica_conferma_iscrizione($id_corso,$idutente){ $SQL_1 = "SELECT * FROM iscrizioni where idutente = '".$idutente . "' and id_corso = '" . $id_corso . "'"; $verifica_conferma_iscrizione = false; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { if ($record_1['pagato']>0) { $verifica_conferma_iscrizione = true; } } } return $verifica_conferma_iscrizione; } function verifica_conferma_iscrizione_eventi($id_corso,$idutente){ $SQL_1 = "SELECT * FROM iscrizioni where idutente = '".$idutente . "' and id_evento = '" . $id_corso . "'"; $verifica_conferma_iscrizione_eventi = false; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { if ($record_1['pagato']>0) { $verifica_conferma_iscrizione_eventi = true; } } } return $verifica_conferma_iscrizione_eventi; } function verifica_registro($id_corso){ $SQL_1 = "SELECT * FROM corso where id = '" . $id_corso . "'"; $verifica_registro = false; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { if ($record_1['id_protocollo'] == 0) $verifica_registro = true; } } return $verifica_registro; } function recupera_areadoc($id){ $SQL_1 = "SELECT * FROM areedoc where id = '" . $id . "'"; $areadoc = 0; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $areadoc = $record_1['titolo']; } } return $areadoc; } function recupera_nomedocumento($id){ $SQL_1 = "SELECT * FROM documenti where id = '" . $id . "'"; $nomedoc = 0; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $nomedoc = $record_1['titolo']; } } return $nomedoc; } function recupera_titolo_pagina($id){ $SQL_1 = "SELECT * FROM pagine where id = '" . $id . "'"; $titolo_pagina = ""; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $titolo_pagina = $record_1['titolo']; } } return $titolo_pagina; } function recupera_titolo_news($id){ $SQL_1 = "SELECT * FROM news where id = '" . $id . "'"; $titolo_news = ""; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $titolo_news = $record_1['titolo']; } } return $titolo_news; } function recupera_titolo_eventi($id){ $SQL_1 = "SELECT * FROM eventi where id = '" . $id . "'"; $titolo_eventi = ""; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $titolo_eventi = $record_1['titolo']; } } return $titolo_eventi; } function recupera_sottotitolo_pagina($id){ $SQL_1 = "SELECT * FROM pagine where id = '" . $id . "'"; $sottotitolo_pagina = ""; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $sottotitolo_pagina = $record_1['sottotitolo']; } } return $sottotitolo_pagina; } function recupera_contenuto_pagina($id){ $SQL_1 = "SELECT * FROM pagine where id = '" . $id . "'"; $contenuto_pagina = ""; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $contenuto_pagina = $record_1['colonna1']; } } return $contenuto_pagina; } function aggiorna_registro_protocollo($key, $numero) { $esito = mysql_query("update protocollo set numero = " . $numero . " WHERE id='".$key."'"); } function recupera_numeroregistro($id_registro){ $SQL_1 = "SELECT * FROM protocollo where id = '" . $id_registro . "'"; $numero_registro = 0; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $numero_registro = $record_1['numero'] + 1; } } return $numero_registro; } function verifica_bonifico($id_corso,$idutente){ $SQL_1 = "SELECT * FROM iscrizioni where idutente = '".$idutente . "' and id_corso = '" . $id_corso . "'"; $verifica_bonifico = false; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { if ($record_1['nomefile'] <> "") $verifica_bonifico = true; } } return $verifica_bonifico; } function conta_iscrizioni($id_corso){ $SQL_1 = "SELECT * FROM iscrizioni where id_corso = '" . $id_corso . "'"; $conta_iscrizioni = 0; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $conta_iscrizioni += 1; } } return $conta_iscrizioni; } function posti_disponibili($id_corso){ $SQL_1 = "SELECT * FROM iscrizioni where id_corso = '" . $id_corso . "'"; $conteggio = 0; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $conteggio += 1; } } $SQL_1 = "SELECT * FROM corso where id = '" . $id_corso . "'"; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $posti_disponibili = $record_1['nr_massimo'] - $conteggio; } } return $posti_disponibili; } function recupera_corso_da_iscrizione($id){ $SQL_1 = "SELECT * FROM corso where id = ".$id; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { return $record_1['titolo']; } } } function recupera_datacorso_da_iscrizione($id){ $SQL_1 = "SELECT * FROM corso where id = ".$id; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { return DataEngToIta($record_1['datacorso']); } } } function recupera_idcorso_da_iscrizione($id){ $SQL_1 = "SELECT * FROM corso where id = ".$id; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { return $record_1['id']; } } } function recupera_corso($id){ $SQL_1 = "SELECT * FROM corsi where id = ".$id; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { return $record_1['titolo']; } } } function recupera_dati_corso($id, $campo){ $SQL_1 = "SELECT * FROM corsi where id = ".$id; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { return $record_1[$campo]; } } } function recupera_campo_corso($id, $campo){ $SQL_1 = "SELECT * FROM corso where id = ".$id; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { return $record_1[$campo]; } } } function verifica_campo($nomecampo,$utente){ $SQL_1 = "SELECT * FROM campi where nome_campo = '".$nomecampo . "'"; $verifica_campo = true; $recordset_1 = mysql_query ($SQL_1) or die (mysql_error()); if (mysql_num_rows($recordset_1) > 0) { while ($record_1 = mysql_fetch_array($recordset_1)) { $id_campo = $record_1['id']; $SQL_2 = "SELECT * FROM x_users where id = ".$utente; $recordset_2 = mysql_query ($SQL_2) or die (mysql_error()); if (mysql_num_rows($recordset_2) > 0) { while ($record_2 = mysql_fetch_array($recordset_2)) { if (in_array ($id_campo, explode("^",substr($record_2['campi'],0,-1)))) $verifica_campo = false; } } } } return $verifica_campo; } function aggiorna_visite_formazione($key) { $recordsetUser = mysql_query("SELECT * FROM corsi where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { $visto = $rec['visto'] + 1; } $esito = mysql_query("update corsi set visto = '" . $visto . "' WHERE id='".$key."'"); } function aggiorna_visite_catalogo($key) { //Aggiorniamo le visite solo se il cookie è scaduto if(isset($_COOKIE['articolo'])){ $key_cook = $_COOKIE['articolo']; if ($key_cook <> $key) { $recordsetUser = mysql_query("SELECT * FROM catalogo where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { $visto = $rec['visto'] + 1; } $esito = mysql_query("update catalogo set visto = '" . $visto . "' WHERE id='".$key."'"); } //Aggiorniamo il cookie della durata di un'ora setcookie('articolo',$key,time()+3600); } } function recupera_certificazioni($key, $percorso) { $servizi = ""; $recordsetUser = mysql_query("SELECT * FROM certificazioni ORDER BY id"); while ($rec = mysql_fetch_array($recordsetUser)) { if (in_array ($rec['id'], explode("^",substr($key,0,-1)))) { //$servizi .= $rec['descrizione'].", "; if ($percorso == 1) { $servizi .= " "; } else { $servizi .= " "; } } } if ($servizi <> '') return $servizi; else return ''; } function recupera_istruttori($key, $pagina) { $servizi = ""; $recordsetUser = mysql_query("SELECT * FROM x_users ORDER BY id"); while ($rec = mysql_fetch_array($recordsetUser)) { if (in_array ($rec['id'], explode("^",substr($key,0,-1)))) { if ($pagina == 1) { $link = "".$rec['nome']." ".$rec['cognome'].""; } else { $link = "".$rec['nome']." ".$rec['cognome'].""; } $servizi .= $link."
"; } } if ($servizi <> '') return $servizi; else return ''; } function verifica_responsabile($key) { $recordsetUser = mysql_query("SELECT * FROM corso where attivo = 1"); $lflag = false; while ($rec = mysql_fetch_array($recordsetUser)) { if ($lflag) { } else { if (in_array ($key, explode("^",substr($rec['responsabile'],0,-1)))) { $lflag =true; } } } return $lflag; } function verifica_responsabile_corso($key, $record) { $recordsetUser = mysql_query("SELECT * FROM corso where id = ". $record); $lflag = false; while ($rec = mysql_fetch_array($recordsetUser)) { if ($lflag) { } else { if (in_array ($key, explode("^",substr($rec['responsabile'],0,-1)))) { $lflag =true; } } } return $lflag; } function recupera_procedura($key) { $procedura = ""; $recordsetUser = mysql_query("SELECT * FROM x_users where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { $procedura = stripslashes($rec['alias']). " (Curatore: ".recupera_nome($rec['id_curatore']).")"; } return $procedura; } function recupera_nome($key) { $nome = ""; $recordsetUser = mysql_query("SELECT * FROM x_users where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { $nome = stripslashes($rec['cognome'])." ".stripslashes($rec['nome']); } return $nome; } function link_url($key, $target) { if ($target == 1) { $target = "target='_blank'"; } else { $target = ""; } $link_url = ""; return $link_url; } function campo_anagrafico($key, $campo) { $valore_campo = ""; $recordsetUser = mysql_query("SELECT * FROM x_users where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { $valore_campo = stripslashes($rec[$campo]); } return $valore_campo; } function recupera_livello($key) { $livello = 3; $recordsetUser = mysql_query("SELECT * FROM x_users where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { $livello = $rec['livello']; } return $livello; } function visualizza_nome($key) { $nome = ""; $recordsetUser = mysql_query("SELECT * FROM x_users where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { if ($rec['pubblico'] == 0) { $nome = $rec['nome']." ".$rec['cognome']; } else { $nome = $rec['alias']; if ($nome == "") { $nome = $rec['cognome']; } } } return $nome; } function recupera_responsabile($key, $pagina) { $servizi = ""; $recordsetUser = mysql_query("SELECT * FROM x_users ORDER BY id"); while ($rec = mysql_fetch_array($recordsetUser)) { if (in_array ($rec['id'], explode("^",substr($key,0,-1)))) { if ($pagina == 1) { $link = "".$rec['nome']." ".$rec['cognome'].""; } else { $link = "".$rec['nome']." ".$rec['cognome'].""; } $servizi .= $link."
"; } } if ($servizi <> '') return $servizi; else return ''; } function recupera_email_responsabile($record) { $recordsetUser = mysql_query("SELECT * FROM corso where id = ". $record); $lflag = false; while ($rec = mysql_fetch_array($recordsetUser)) { $responsabile = $rec['responsabile']; } $recordsetUser = mysql_query("SELECT * FROM x_users ORDER BY id"); $email = ""; while ($rec = mysql_fetch_array($recordsetUser)) { if (in_array ($rec['id'], explode("^",substr($responsabile,0,-1)))) { if ($email == "") { $email = $rec['email']; } else { $email = ";".$rec['email']; } } } return $email; } function recupera_email_admin() { $email = ""; $recordsetUser = mysql_query("SELECT * FROM x_users where flag_attivo = 1 ORDER BY id"); while ($rec = mysql_fetch_array($recordsetUser)) { if ($rec['flag_admin'] == 1) { if ($email == "") { $email = $rec['email']; } else { $email = $email ."; ".$rec['email']; } } } return $email; } function conta_giudizio($key) { $giudiziototale = 0; $recordcom = mysql_query("SELECT * FROM commenti where moderato = 'S' and id_struttura=".$key); $nrcommenti = mysql_num_rows($recordcom); $SQLfoto = "SELECT * FROM commenti WHERE moderato = 'S' and id_struttura = " . $key; $resultfoto = mysql_query ($SQLfoto) or die (mysql_error()); if (mysql_num_rows($resultfoto) > 0) { while ($recordFoto = mysql_fetch_array($resultfoto)) { $giudiziototale += $recordFoto['pulizia']; $giudiziototale += $recordFoto['comfort']; $giudiziototale += $recordFoto['posizione']; $giudiziototale += $recordFoto['servizi']; $giudiziototale += $recordFoto['staff']; $giudiziototale += $recordFoto['rapporto']; } } return ($giudiziototale/6)/$nrcommenti; } function recupera_voto($key, $campo) { $posizione = 0; $giudizio = 0; $recordcom = mysql_query("SELECT * FROM commenti where moderato = 'S' and id_struttura=".$key); $nrcommenti = mysql_num_rows($recordcom); $SQLfoto = "SELECT * FROM commenti WHERE moderato = 'S' and id_struttura = " . $key; $resultfoto = mysql_query ($SQLfoto) or die (mysql_error()); if (mysql_num_rows($resultfoto) > 0) { while ($recordFoto = mysql_fetch_array($resultfoto)) { $giudizio += $recordFoto[$campo]; } } return $giudizio/$nrcommenti; } function verificaservizio($keystruttura, $tiposervizio){ $idservizioattivo = 0; $recordset = mysql_query("SELECT * FROM attivazioni where codservizio = ". $tiposervizio ." and id_struttura= ".$keystruttura); while ($recges = mysql_fetch_array($recordset)) { $idservizioattivo = 1; } return $idservizioattivo; } function recupera_footer(){ $testo_footer = ""; $recordsetgest = mysql_query("SELECT * FROM configurazione where id = 1"); while ($recges = mysql_fetch_array($recordsetgest)) { $testo_footer = $recges['footer']; } return $testo_footer; } function recupera_nomesito(){ $nome_sito = ""; $recordsetgest = mysql_query("SELECT * FROM configurazione where id = 1"); while ($recges = mysql_fetch_array($recordsetgest)) { $nome_sito = $recges['nome_sito']; } return $nome_sito; } function recupera_nomesito_link(){ $nome_sito_link = ""; $recordsetgest = mysql_query("SELECT * FROM configurazione where id = 1"); while ($recges = mysql_fetch_array($recordsetgest)) { $nome_sito_link = "".$recges['nome_sito'].""; } return $nome_sito_link; } function recupera_email_sito(){ $email_sito = ""; $recordsetgest = mysql_query("SELECT * FROM configurazione where id = 1"); while ($recges = mysql_fetch_array($recordsetgest)) { $email_sito = $recges['email_sito']; } return $email_sito; } function recupera_email_invio_iscrizione(){ $email_invio_iscrizione = ""; $recordsetgest = mysql_query("SELECT * FROM configurazione where id = 1"); while ($recges = mysql_fetch_array($recordsetgest)) { $email_invio_iscrizione = $recges['email_iscrizione']; } return $email_invio_iscrizione; } function recupera_email_invio(){ $email_invio = ""; $recordsetgest = mysql_query("SELECT * FROM configurazione where id = 1"); while ($recges = mysql_fetch_array($recordsetgest)) { $email_invio = $recges['email_invio']; } return $email_invio; } function recupera_email_iscrizione(){ $email_iscrizione = ""; $recordsetgest = mysql_query("SELECT * FROM configurazione where id = 1"); while ($recges = mysql_fetch_array($recordsetgest)) { $email_iscrizione = $recges[email_iscrizione]; } return $email_iscrizione; } function recupera_indirizzo(){ $indirizzo = ""; $recordsetgest = mysql_query("SELECT * FROM configurazione where id = 1"); while ($recges = mysql_fetch_array($recordsetgest)) { $indirizzo = $recges['indirizzo']; } return $indirizzo; } function recupera_telefono(){ $telefono = ""; $recordsetgest = mysql_query("SELECT * FROM configurazione where id = 1"); while ($recges = mysql_fetch_array($recordsetgest)) { $telefono = $recges['telefono']; } return $telefono; } function decod_stato($key){ $stato = ""; switch ($key) { case 1: $stato = "Usato"; break; case 2: $stato = "Nuovo"; break; case 3: $stato = "Nuovo con Etichetta"; break; default: $stato = "Usato"; break; } return $stato; } function decod_categoria($key){ $categoria = ""; $recordsetUser = mysql_query("SELECT * FROM categoria where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { if ($rec['id'] === $key) { $categoria = $rec['descrizione']; } } return $categoria; } function decod_tabella($key,$tabella,$campo){ $valore = "ciao"; $recordsetUser = mysql_query("SELECT * FROM " . $tabella . " where id = ".$key); while ($rec = mysql_fetch_array($recordsetUser)) { if ($rec['id'] === $key) { $valore = stripslashes($rec[$campo]); } } return $valore; } ?>