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, '<', '<') ; |
END IF ; |
|
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, '’', '''') ; |
END IF ; |
|
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, 'œ', 'œ') ; |
END IF ; |
|
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, '±', '±') ; |
END IF ; |
|
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, '»', '»') ; |
END IF ; |
|
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, 'á', 'á'); |
END IF ; |
|
IF INSTR( x , 'à' ) |
THEN SET TextString = REPLACE(TextString, 'à', 'à'); |
END IF ; |
30,6 → 90,10 |
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, 'è', 'è'); |
END IF ; |
42,6 → 106,10 |
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, 'í', 'í'); |
END IF ; |
50,6 → 118,14 |
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, 'ò', 'ò'); |
END IF ; |
|
IF INSTR( x , 'ô' ) |
THEN SET TextString = REPLACE(TextString, 'ô', 'ô'); |
END IF ; |
58,10 → 134,22 |
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, 'û', 'û'); |
END IF ; |
|
IF INSTR( x , 'ü' ) |
THEN SET TextString = REPLACE(TextString, 'ü', 'ü'); |
END IF ; |
|
IF INSTR( x , 'ÿ' ) |
THEN SET TextString = REPLACE(TextString, 'ÿ', 'ÿ'); |
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) |