Subversion Repositories Sites.tela-botanica.org

Compare Revisions

Regard whitespace Rev 626 → Rev 627

/trunk/tapirlink/bdd/legumino_vue.sql
1,23 → 1,83
DELIMITER $$
DROP FUNCTION IF EXISTS legumino.HTML_UnEncode$$
CREATE DEFINER=`legumino`@`localhost` FUNCTION `HTML_UnEncode`(x VARCHAR(255)) RETURNS varchar(255) CHARSET latin1
DROP FUNCTION IF EXISTS pterido2.HTML_UnEncode$$
CREATE DEFINER=`pterido2`@`localhost` FUNCTION `HTML_UnEncode`(x VARCHAR(255)) RETURNS varchar(255) CHARSET latin1
BEGIN
 
DECLARE TextString VARCHAR(255) ;
SET TextString = x ;
 
IF INSTR( x , '"' )
THEN SET TextString = REPLACE(TextString, '"', '"') ;
END IF ;
 
IF INSTR( x , '&' )
THEN SET TextString = REPLACE(TextString, '&', '&') ;
END IF ;
 
IF INSTR( x , '<' )
THEN SET TextString = REPLACE(TextString, '&#60;', '<') ;
END IF ;
 
IF INSTR( x , '&#62;' )
THEN SET TextString = REPLACE(TextString, '&#62;', '>') ;
END IF ;
 
IF INSTR( x , '&#145;' )
THEN SET TextString = REPLACE(TextString, '&#145;', '‘') ;
END IF ;
 
IF INSTR( x , '&#146;' )
THEN SET TextString = REPLACE(TextString, '&#146;', '''') ;
END IF ;
 
IF INSTR( x , '&#147;' )
THEN SET TextString = REPLACE(TextString, '&#147;', '“') ;
END IF ;
 
IF INSTR( x , '&#148;' )
THEN SET TextString = REPLACE(TextString, '&#148;', '”') ;
END IF ;
 
IF INSTR( x , '&#156;' )
THEN SET TextString = REPLACE(TextString, '&#156;', 'œ') ;
END IF ;
 
IF INSTR( x , '&#171;' )
THEN SET TextString = REPLACE(TextString, '&#171;', '«') ;
END IF ;
 
IF INSTR( x , '&#176;' )
THEN SET TextString = REPLACE(TextString, '&#176;', '°') ;
END IF ;
 
IF INSTR( x , '&#177;' )
THEN SET TextString = REPLACE(TextString, '&#177;', '±') ;
END IF ;
 
IF INSTR( x , '&#178;' )
THEN SET TextString = REPLACE(TextString, '&#178;', '²') ;
END IF ;
 
IF INSTR( x , '&#185;' )
THEN SET TextString = REPLACE(TextString, '&#185;', '¹') ;
END IF ;
 
IF INSTR( x , '&#187;' )
THEN SET TextString = REPLACE(TextString, '&#187;', '»') ;
END IF ;
 
IF INSTR( x , '&#201;' )
THEN SET TextString = REPLACE(TextString, '&#201;', 'É');
END IF ;
 
IF INSTR( x , '&#206;' )
THEN SET TextString = REPLACE(TextString, '&#206;', 'Î');
END IF ;
 
IF INSTR( x , '&#225;' )
THEN SET TextString = REPLACE(TextString, '&#225;', 'á');
END IF ;
 
IF INSTR( x , '&#224;' )
THEN SET TextString = REPLACE(TextString, '&#224;', 'à');
END IF ;
30,6 → 90,10
THEN SET TextString = REPLACE(TextString, '&#228;', 'ä');
END IF ;
 
IF INSTR( x , '&#231;' )
THEN SET TextString = REPLACE(TextString, '&#231;', 'ç');
END IF ;
 
IF INSTR( x , '&#232;' )
THEN SET TextString = REPLACE(TextString, '&#232;', 'è');
END IF ;
42,6 → 106,10
THEN SET TextString = REPLACE(TextString, '&#234;', 'ê');
END IF ;
 
IF INSTR( x , '&#235;' )
THEN SET TextString = REPLACE(TextString, '&#235;', 'ë');
END IF ;
 
IF INSTR( x , '&#237;' )
THEN SET TextString = REPLACE(TextString, '&#237;', 'í');
END IF ;
50,6 → 118,14
THEN SET TextString = REPLACE(TextString, '&#238;', 'î');
END IF ;
 
IF INSTR( x , '&#239;' )
THEN SET TextString = REPLACE(TextString, '&#239;', 'ï');
END IF ;
 
IF INSTR( x , '&#242;' )
THEN SET TextString = REPLACE(TextString, '&#242;', 'ò');
END IF ;
 
IF INSTR( x , '&#244;' )
THEN SET TextString = REPLACE(TextString, '&#244;', 'ô');
END IF ;
58,10 → 134,22
THEN SET TextString = REPLACE(TextString, '&#246;', 'ö');
END IF ;
 
IF INSTR( x , '&#249;' )
THEN SET TextString = REPLACE(TextString, '&#249;', 'ù');
END IF ;
 
IF INSTR( x , '&#251;' )
THEN SET TextString = REPLACE(TextString, '&#251;', 'û');
END IF ;
 
IF INSTR( x , '&#252;' )
THEN SET TextString = REPLACE(TextString, '&#252;', 'ü');
END IF ;
 
IF INSTR( x , '&#255;' )
THEN SET TextString = REPLACE(TextString, '&#255;', 'ÿ');
END IF ;
 
RETURN TextString ;
 
END$$
103,7 → 191,7
'<nom_num_nomenclatural>',l.NumNomen,'</nom_num_nomenclatural>',
'<nom_num_taxonomique>',l.NumTaxon,'</nom_num_taxonomique>',
'</info>') AS observation_information_complement,
c.date_saisie AS saisie_date_modification
DATE_FORMAT(c.date_saisie, '%Y-%m-%d 00:00:00') AS saisie_date_modification
FROM contributions AS c
LEFT JOIN communes AS cm ON (c.code_insee = cm.code_insee)
LEFT JOIN departements AS d ON (cm.num_departements = d.num_departements)